// components/post-comment/comment.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    obj: {
      type: Object,
      value: {}
    },
    index: {
      type: Number,
      value: 1
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    onLongTap: function (e) {
      let { lord, commentid, iscommentator, index } = e.currentTarget.dataset;
      this.triggerEvent('delcomment', {
        lord,
        commentid,
        iscommentator,
        index
      });
    },

    onLongReplyTap: function (e) {
      let { lord, commentid, iscommentator, subindex } = e.currentTarget.dataset;
      this.triggerEvent('delcomment', {
        lord,
        commentid,
        iscommentator,
        subindex
      });
    },

    onReply(e) {
      let { lord, commentid, lordid, subindex } = e.currentTarget.dataset;
      console.log(e.currentTarget.dataset)
      this.triggerEvent('reply', {
        lord,
        commentid,
        lordid,
        subindex
      });
    }
  }
})